﻿using System;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;

namespace ARchGL.Platform.Core
{
    /// <summary>
    /// 包含软删除的基础数据实体
    /// </summary>
    public abstract class EntitySoftDeleteBase : EntityCreatorUserIdBase, ISoftDelete
    {
        /// <summary>
        /// 删除状态：true删除、false正常
        /// </summary>
        public bool IsDeleted { get; set; }
    }

    /// <summary>
    /// 千变基础数据实体
    /// </summary>
    public abstract class QianbianEntityBase : Entity<Guid>, IHasCreationTime
    {
        /// <summary>
        /// 主机/租户
        /// </summary>
        public int TenantId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
    }

    /// <summary>
    /// 基础数据实体 CreatorUserId Guid
    /// </summary>
    public abstract class EntityCreatorUserIdBase : Entity<Guid>, IMustHaveTenant, IHasCreationTime
    {
        /// <summary>
        /// 主机/租户
        /// </summary>
        public int TenantId { get; set; }
        /// <summary>
        /// 创建人标识
        /// </summary>
        public Guid? CreatorUserId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
    }

    /// <summary>
    /// 基础数据实体
    /// </summary>
    public abstract class EntityBase : Entity<Guid>, IMustHaveTenant, IHasCreationTime, ICreationAudited
    {
        /// <summary>
        /// 主机/租户
        /// </summary>
        public int TenantId { get; set; }
        /// <summary>
        /// 创建人标识
        /// </summary>
        public long? CreatorUserId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
    }
}
